class JSONFileKey:
    SYSTEM = "GCBS.system_content"
    HARDWARE = "GCBS.hardware.information"
    SOFTWARE = "GCBS.software.information"
    BM_CONTENT = "GCBS.benchmark_content"
    BM_SUMMARY = "GCBS.benchmark.summary"
    BM_DETAIL = "GCBS.benchmark.detail"

    VERSION = "version"
    MODE = "mode"
    SUITE = "suite"
    TEST_TARGET = "test_target"
    OUTPUT_DIR = "output_dir"
    ITERATIONS = "iterations"
    COPIES = "copies"
    SKIP_FAIL = "skip_fail"
    SKIP_VERIFY = "skip_verify"
    VALID = "valid"
    ERRORS = "errors"
    SCORE = "score"
    SUB_ITEM = "sub_item"
    INDEX = "index"
    TESTER_NAME = "tester_name"
    TEST_TIME = "test_time"
    RUN_TIME = "run_time"
    REPORT_TIME = "report_time"
    CONFIG = "config"
    MACHINE_INFO = "machine_info"

    SUB_SUITES = "sub_suites"
    WORKLOADS = "workloads"
    SUB_SUITES_TOTAL = "sub_suites_total"

    NAME = "name"
    TYPE = "type"
    DESC = "desc"
    UNIT = "unit"
    LANG = "lang"
    ELAPSED_TIME = "elapsed_time"
    COMPILE_OPTIONS = "compile_options"
    COMPILER_VERSION = "compiler_version"
    JAVA_OPTIONS = "java_options"
    JAVA_VERSION = "java_version"
    PYTHON_OPTIONS = "python_options"
    PYTHON_VERSION = "python_version"
    DATA = "data"
    ROUND = "round"
    START_TIME = "start_time"
    END_TIME = "end_time"
    RUN_ERRCODE = "run_errcode"
    SINGLE = "single"
    MULTI = "multi"


class PdfReportFormat:
    LR_MARGIN = 19
    TOP_MARGIN = 35
    CONTENT_SPACE = 6
    BODY_SPACEAFTER = 3
    SPACE_TAG = 10  # blank line pixel
    BOTTOM_MARGIN = 29
    MAX_LENGTH = 842
    MAX_WIDTH = 595
    HEADER_X = 30
    HEADER_Y = 820
    HEADER = 30
    FOOTER_STR_X = 230
    FOOTER_STR_Y = 14
    FOOTER_IMG_X = 190
    FOOTER_IMG_Y = 0
    IMG_WIDTH = 40
    IMG_HEIGHT = 35
    SUMMARY_HEADER = 81
    REPORT_INFO_WIDTH = 223
    BRAND_WIDTH = 334
    SCORE = 36
    # horizontal
    HORIZONTAL_SPLIT_LINES = 140
    HORIZONTAL_FS = 5
    HORIZONTAL_BORDER_WIDTH = 1
    HORIZONTAL_LEFT_INDIGENT = -5
    HORIZONTAL_RIGHT_INDIGENT = -5

    HORIZONTAL_LEFT = 18
    HORIZONTAL_RIGHT = 160
    HORIZONTAL_SPACE = 5
    SUMMARY_HORIZONTAL_LEFT = 18
    DETAIL_HORIZONTAL_LEFT = 475

    WL_HORIZONTAL_RIGHT = 23

    TESTER_SPACE_EN = 30
    TESTER_SPACE_ZH = 27

    # hardware
    HARDWARE_TITLE = 36
    HARDWARE_LEFT = 132
    HARDWARE_RIGHT = 132
    HARDWARE_COL_PARAM = 7

    # software
    SOFTWARE_TITLE = 36
    SOFTWARE_LEFT = 150
    SOFTWARE_RIGHT = 150
    SOFTWARE_COL_PARAM = 8

    DESC_ROW_LENGTH = 35
    DESC_MAX_LENGTH = 200
    RUN_COPY_INDIGENT = 5
    COMPILE_LEFT_INDIGENT = 8
    PARA_RIGHT_INDIGENT = 7
    PARA_LEFT_INDIGENT = 15
    STATUS_LEFT_INDIGENT = 20
    STATUS_SPACE = 3
    NOTES_SPACE = 10

    PARA_SEPARATORS_NUM = 135
    COMPILE_SEPARATORS_NUM = 70
    SUITE_SEPARATORS_NUM = 65

    HF_FS = 11  # header and footer font size
    BRAND_FS = 20
    REPORT_VERSION_FS = 18
    SCORE_FS = 14
    HS_FS = 10
    TEST_CASE_FS = 7
    FS = 12  # category font size in bar charts
    NOTES_TITLE_FS = 16  # notes title font size

    BRAND_LEADING = 15
    SYS_LEADING = 9
    SYS_COL_WIDTH = 91
    SYS_ROW_HEIGHT = 18
    TEST_CASE_LEADING = 8
    OPTION_COL_WIDTH = 100
    OPTION_ROW_HEIGHT = 20
    OPTION_ROW = 50
    OPTION_LEADING = 8
    OPTION_RIGHT_INDENT = -20

    # font face
    BOLD = "Bold"
    MEDIUM = "Medium"
    REGULAR = "Regular"
    LIGHT = "Light"
    THIN = "Thin"

    TAG_BLOCK = "&#160;"

    WATERMARK_COLOR = "#F0F0F0"


class ReportContentKey:
    HARDWARE = "hardware"
    SOFTWARE = "software"
    FUNCTION = "function"
    PARAMS = "params"

    HEADER = "header"
    FOOTER = "footer"
    SUITE_SCORE = "suite_score"
    SINGLE_COPY = "single_copy"
    MULTI_COPIES = "multi_copies"
    PARTIAL_RUN = "partial_run"

    # language
    ZH_CN = "zh_CN"

    # table
    REPORT_DATE = "report_date"

    RESULT_STATUS = "result_status"
    TESTCASE_STATUS = "testcase_status"
    SUCCESS = "success"
    INVALID = "invalid"

    DAY = "day"
    HOUR = "hour"
    MINUTE = "minute"
    SECOND = "second"
    PARALLEL_PROCESSES = "parallel_processes"
    TEST_SUITES = "test_suites"
    WORKLOADS = "workloads"
    SUB_ITEMS = "sub_items"
    DESC = "description"
    SCORE = "score"
    INDEX = "index"

    TEST_CASES = "test_cases"
    SECONDS = "seconds"
    UNIT = "unit"
    SUITE_TOTAL_SCORE = "suite_total_score"

    SYS_INFO = "sys_info"
    BM_SUMMARY = "bm_summary"
    BM_SUITE = "bm_suite"
    BM_DATA = "bm_data"
    FLAG = "flag"
    TEST_TIME = "test_time"
    TESTER_NAME = "tester_name"

    COMPILER_VERSION = "compiler_version"
    COMPILE_OPTION = "compile_option"
    ENVIORNMENT_INFO = "enviornment_info"

    DEFAULT = "default"

    JAVA_VERSION = "java_version"
    C_VERSION = "c_version"
    CXX_VERSION = "cxx_version"

    C_OPTIONS = "c_options"
    CXX_OPTIONS = "cxx_options"
    JAVA_OPTIONS = "java_options"


class PdfContentEN:
    HEADER = "GCBS-GPU v{} report, {}."
    FOOTER = "page {} of {}"
    SUITE_SCORE = "Composite Score ( {} ) : {}"
    SINGLE_CORY = "{} copy"
    MULTI_COPIES = "{} copies"
    PARTIAL_RUN = "Incomplete Operation, No Score"
    UNKNOWN = "UnKnown"
    SUCCESS = "SUCCESS"
    INVALID = "INVALID"

    REPORT_VERSION = "GCBS-GPU v{}"
    TESTER_NAME = "Tester: {}"
    REPORT_DATE = "Report Date: {}"
    RESULT_STATUS = "Result Status:"
    PDF_TESTCASE_STATUS = "{} {} (Total: {}, Success: {}, Failed: {})"
    TOTAL_CASES = "TotalCases:"
    SUCCESS_CASES = "SuccessCases:"
    FAIL_CASES = "FailCases:"
    # hardware
    HW_TITLE = "Hardware"
    PRODUCT_MODEL = "Product Model:"
    BIOS_VERSION = "BIOS Version:"
    CPU_MODEL = "CPU Model:"
    ARCH = "Arch:"
    CPU_CORES = "CPU Cores:"
    MEMORY = "Memory:"
    OS_DISK = "OS Disk:"
    NET_CARDS = "Net Card:"
    RAID = "Raid Card:"
    DISPLAY_CARDS = "Display Card:"
    MANUFACTURER = "Manufacturer:"
    HW_OTHERS = "Others:"

    # software
    SW_TITLE = "Software"
    OS = "OS Release:"
    KERNEL = "OS Kernel:"
    COMPILER = "Compiler:"
    FILE_SYSTEM = "File System:"
    RUN_LEVEL = "Run Level:"
    IO_SCHEDULER = "IO Scheduler:"
    PAGE_SIZE = "Page Size:"
    HUGE_PAGE_SIZE = "Huge Page Size:"
    THP = "THP:"
    BASH = "Bash:"
    BINUTILS = "Binutils:"
    PYTHON3 = "Python3:"
    JAVA = "Java:"
    GLIBC = "Glibc:"
    SW_OTHERS = "Others:"

    TEST_SUITES = "TestSuites"
    DESC = "Description"
    SCORE = "Score"
    INDEX = "Index"

    DAY = "{}d"
    HOUR = "{}h"
    MINUTE = "{}m"
    SECOND = "{}s"
    PARALLEL_PROCESSES = "Benchmark Run: {} parallel processes, &#160;Time: {} - {}, {}"
    TEST_CASES = "TestCases"
    WORKLOADS = "Workloads"
    SUB_ITEMS = "SubItems"
    SECONDS = "Seconds"
    UNIT = "Unit"
    SUITE_TOTAL_SCORE = "{} Total Score"

    COMPILER_VERSION = "Compiler Version"
    COMPILE_OPTION = "Optimization Flags"
    ENVIORNMENT_INFO = "Envirnment_info"

    DEFAULT = "Default"

    JAVA_VERSION = "Java running environment info"
    C_VERSION = "{}C compiler info"
    CXX_VERSION = "{}C++ compiler info"

    C_OPTIONS = "C option info: "
    CXX_OPTIONS = "C++ option info: "
    JAVA_OPTIONS = "Java option info: "


class PdfContentZH:
    HEADER = "GCBS-GPU v{}，测试时间 {}."#"通用计算机基准套件v{}，测试时间{}."
    FOOTER = "General Computing Benchmark Suite                                               第{}页/共{}页"
    SUITE_SCORE = "综合得分( {} ) : {}"
    SINGLE_CORY = "{} copy"
    MULTI_COPIES = "{} copies"
    PARTIAL_RUN = "未完整运行，无得分"
    UNKNOWN = "未知"
    SUCCESS = "通过"
    INVALID = "未通过"

    TESTER_NAME = "测试者: {}"
    REPORT_DATE = "测试日期: {}"
    RESULT_STATUS = "测试用例通过情况："
    PDF_TESTCASE_STATUS = "{} {} (共计: {}, 通过: {}, 失败: {})"
    # hardware
    HW_TITLE = "硬件信息"
    PRODUCT_MODEL = "产品型号："
    BIOS_VERSION = "BIOS版本："
    CPU_MODEL = "CPU型号"
    ARCH = "架构："
    CPU_CORES = "CPU核心数："
    MEMORY = "内存："
    OS_DISK = "系统盘："
    NET_CARDS = "网卡："
    RAID = "RAID卡："
    DISPLAY_CARDS = "显卡："
    MANUFACTURER = "制造商："
    HW_OTHERS = "其他信息："

    # software
    SW_TITLE = "软件信息"
    OS = "操作系统："
    KERNEL = "系统内核："
    COMPILER = "编译器："
    FILE_SYSTEM = "文件系统："
    RUN_LEVEL = "运行级别："
    IO_SCHEDULER = "IO调度："
    PAGE_SIZE = "内存页大小："
    HUGE_PAGE_SIZE = "大页内存："
    THP = "透明大页："
    BASH = "Bash："
    BINUTILS = "Binutils:"
    PYTHON3 = "Python3："
    JAVA = "Java："
    GLIBC = "Glibc："
    SW_OTHERS = "其他信息："

    DAY = "{}天"
    HOUR = "{}小时"
    MINUTE = "{}分钟"
    SECOND = "{}秒"
    PARALLEL_PROCESSES = "测试项运行：进程运行数{}, &#160;测试时间: {} - {}, {}"
    TEST_SUITES = "测试套"
    WORKLOADS = "测试负载"
    SUB_ITEMS = "子项"
    DESC = "描述"
    SCORE = "分数"
    INDEX = "标准分"

    TEST_CASES = "测试项"
    SECONDS = "时间(s)"
    UNIT = "单位"
    SUITE_TOTAL_SCORE = "{} 总分"

    COMPILER_VERSION = "构建运行信息"
    COMPILE_OPTION = "优化选项信息"
    ENVIORNMENT_INFO = "环境详细信息"

    DEFAULT = "默认"

    JAVA_VERSION = "Java运行环境信息"
    C_VERSION = "{}C语言编译器信息"
    CXX_VERSION = "{}C++语言编译器信息"

    C_OPTIONS = "C语言优化选项: "
    CXX_OPTIONS = "C++语言优化选项: "
    JAVA_OPTIONS = "Java优化选项: "
